package com.devinlee.mode.web;

import com.devinlee.mode.containers.RoleContainer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * 角色控制器
 * <p>
 * Created by devinlee in 2021.10.26
 */
@RestController
public class RoleController {

    @Autowired
    private RoleContainer roleContainer;

    @GetMapping("/getRole/{code}")
    public String getRole(@PathVariable(value = "code") int code) {

        return roleContainer.get(code).handlePrint();
    }
}
